﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbDiploma.Entities
{
    public class EventEntity
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int EventId { get; set; }

        [Required]
        public string Title { get; set; }

        [Required]
        [DataType(DataType.MultilineText)]
        public string Description { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        public DateTime Created { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        public DateTime Begin { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        public DateTime End { get; set; }

        [Required]
        public string Address { get; set; }

        public virtual CountryEntity Country { get; set; }
        public virtual CityEntity City { get; set; }

        public long Latitude { get; set; }
        public long Longitude { get; set; }

        public virtual UserEntity Creator { get; set; }

        public bool IsApproved { get; set; }
        public bool IsValidated { get; set; }
        public bool IsValidating { get; set; }

        public virtual ICollection<CommentEntity> Comments { get; set; }
        public virtual ICollection<LikeEntity> Likes { get; set; }
        public virtual ICollection<TagEntity> Tags { get; set; }

        public virtual ICollection<FollowerEntity> Followers { get; set; }
    }
}